package com.forcht.ioc.context;

import com.forcht.ioc.factory.AbstractBeanFactory;

/**
 * Created by forcht on 2018/4/18.
 */
public abstract class AbstractApplicationContext implements ApplicationContext{

    //代理模式
    protected AbstractBeanFactory beanFactory;

    public AbstractApplicationContext(AbstractBeanFactory beanFactory){
        this.beanFactory=beanFactory;
    }

    public void refresh() throws Exception{

    }

    @Override
    public Object getBean(String name) throws Exception {
        return beanFactory.getBean(name);
    }
}
